package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysRoomUserMapper;
import com.ruoyi.system.domain.SysRoomUser;
import com.ruoyi.system.service.ISysRoomUserService;

/**
 * 房间创建信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-09-18
 */
@Service
public class SysRoomUserServiceImpl implements ISysRoomUserService 
{
    @Autowired
    private SysRoomUserMapper sysRoomUserMapper;

    /**
     * 查询房间创建信息
     * 
     * @param roomId 房间创建信息主键
     * @return 房间创建信息
     */
    @Override
    public SysRoomUser selectSysRoomUserByRoomId(Long roomId)
    {
        return sysRoomUserMapper.selectSysRoomUserByRoomId(roomId);
    }

    /**
     * 查询房间创建信息列表
     * 
     * @param sysRoomUser 房间创建信息
     * @return 房间创建信息
     */
    @Override
    public List<SysRoomUser> selectSysRoomUserList(SysRoomUser sysRoomUser)
    {
        return sysRoomUserMapper.selectSysRoomUserList(sysRoomUser);
    }

    /**
     * 新增房间创建信息
     * 
     * @param sysRoomUser 房间创建信息
     * @return 结果
     */
    @Override
    public int insertSysRoomUser(SysRoomUser sysRoomUser)
    {
        sysRoomUser.setCreateTime(DateUtils.getNowDate());
        return sysRoomUserMapper.insertSysRoomUser(sysRoomUser);
    }

    /**
     * 修改房间创建信息
     * 
     * @param sysRoomUser 房间创建信息
     * @return 结果
     */
    @Override
    public int updateSysRoomUser(SysRoomUser sysRoomUser)
    {
        return sysRoomUserMapper.updateSysRoomUser(sysRoomUser);
    }

    /**
     * 批量删除房间创建信息
     * 
     * @param roomIds 需要删除的房间创建信息主键
     * @return 结果
     */
    @Override
    public int deleteSysRoomUserByRoomIds(Long[] roomIds)
    {
        return sysRoomUserMapper.deleteSysRoomUserByRoomIds(roomIds);
    }

    /**
     * 删除房间创建信息信息
     * 
     * @param roomId 房间创建信息主键
     * @return 结果
     */
    @Override
    public int deleteSysRoomUserByRoomId(Long roomId)
    {
        return sysRoomUserMapper.deleteSysRoomUserByRoomId(roomId);
    }
}
